package com.biz.model.Hmodel.base;

import javax.persistence.*;
import java.util.Date;

/**
 * Created by lzq.
 */

@Entity
@Table(name = "base_mebactivity_user")
public class TBaseMebactivityUser {
    private String id;
    private String mainId;
    private String userId;
    private Integer state=0;
    private Integer isdel=0;
    private Date createTime=new Date();
    private Integer ispresent=0;
    private Integer approvState=0;
    private String appNotes="";

    @Id
    @Column(name = "id", nullable = false, length = 50)
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "mainId", nullable = true, length = 50)
    public String getMainId() {
        return mainId;
    }

    public void setMainId(String mainId) {
        this.mainId = mainId;
    }

    @Basic
    @Column(name = "userId", nullable = true, length = 50)
    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    @Basic
    @Column(name = "state", nullable = true)
    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    @Basic
    @Column(name = "isdel", nullable = true)
    public Integer getIsdel() {
        return isdel;
    }

    public void setIsdel(Integer isdel) {
        this.isdel = isdel;
    }

    @Basic
    @Column(name = "createTime", nullable = true)
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "ispresent", nullable = true)
    public Integer getIspresent() {
        return ispresent;
    }

    public void setIspresent(Integer ispresent) {
        this.ispresent = ispresent;
    }

    @Basic
    @Column(name = "approvState", nullable = true)
    public Integer getApprovState() {
        return approvState;
    }

    public void setApprovState(Integer approvState) {
        this.approvState = approvState;
    }

    @Basic
    @Column(name = "appNotes", nullable = true, length = 255)
    public String getAppNotes() {
        return appNotes;
    }

    public void setAppNotes(String appNotes) {
        this.appNotes = appNotes;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TBaseMebactivityUser that = (TBaseMebactivityUser) o;

        if (id != null ? !id.equals(that.id) : that.id != null) return false;
        if (mainId != null ? !mainId.equals(that.mainId) : that.mainId != null) return false;
        if (userId != null ? !userId.equals(that.userId) : that.userId != null) return false;
        if (state != null ? !state.equals(that.state) : that.state != null) return false;
        if (isdel != null ? !isdel.equals(that.isdel) : that.isdel != null) return false;
        if (createTime != null ? !createTime.equals(that.createTime) : that.createTime != null) return false;
        if (ispresent != null ? !ispresent.equals(that.ispresent) : that.ispresent != null) return false;
        if (approvState != null ? !approvState.equals(that.approvState) : that.approvState != null) return false;
        if (appNotes != null ? !appNotes.equals(that.appNotes) : that.appNotes != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (mainId != null ? mainId.hashCode() : 0);
        result = 31 * result + (userId != null ? userId.hashCode() : 0);
        result = 31 * result + (state != null ? state.hashCode() : 0);
        result = 31 * result + (isdel != null ? isdel.hashCode() : 0);
        result = 31 * result + (createTime != null ? createTime.hashCode() : 0);
        result = 31 * result + (ispresent != null ? ispresent.hashCode() : 0);
        result = 31 * result + (approvState != null ? approvState.hashCode() : 0);
        result = 31 * result + (appNotes != null ? appNotes.hashCode() : 0);
        return result;
    }
}
